﻿using MediatR;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

namespace GoodsModule.Infrastructure
{
    public class GoodsModuleDbContext : DDD.EFCore.EFContext<GoodsModuleDbContext>
    {
        public GoodsModuleDbContext(DbContextOptions<GoodsModuleDbContext> options, IMediator mediator, IServiceProvider provider)
            : base(options, mediator, provider)
        {
            
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            //modelBuilder.ApplyConfiguration(new OrderEntityTypeConfiguration());
            base.OnModelCreating(modelBuilder);
        }

        public DbSet<Domain.GoodsAggregate.Goods> Goods { get; set; }
        public DbSet<Domain.GoodsCategoryAggregate.GoodsCategory> GoodsCategory { get; set; }
    }
}
